﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcWebShose.Models.SanPhamModels>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ShowAllSanPham
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>ShowAllSanPham</h2>

    <table>
        <tr>
            <th></th>
            <th>
                MA_SP
            </th>
            <th>
                MA_NCC
            </th>
            <th>
                MA_LOAI
            </th>
            <th>
                TEN_SP
            </th>
            <th>
                MOTA
            </th>
            <th>
                GIA_SP
            </th>
            <th>
                HINHANH
            </th>
            <th>
                QUYCACH
            </th>
            <th>
                TRANGTHAI
            </th>
            <th>
                id
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new {  id=item.MA_SP }) %> |
                <%: Html.ActionLink("Details", "Details", new { id=item.MA_SP })%> |
                <%: Html.ActionLink("Delete", "Delete", new { id=item.MA_SP})%>
            </td>
            <td>
                <%: item.MA_SP %>
            </td>
            <td>
                <%: item.MA_NCC %>
            </td>
            <td>
                <%: item.MA_LOAI %>
            </td>
            <td>
                <%: item.TEN_SP %>
            </td>
            <td>
                <%: item.MOTA %>
            </td>
            <td>
                <%: item.GIA_SP %>
            </td>
            <td>
                <%: item.HINHANH %>
            </td>
            <td>
                <%: item.QUYCACH %>
            </td>
            <td>
                <%: item.TRANGTHAI %>
            </td>
            <td>
                <%: item.id %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

